@testset "309.best-time-to-buy-and-sell-stock-with-cooldown.jl" begin
    @test max_profit_309([1, 2, 3, 0, 2]) == 3
    @test max_profit_309([8, 29, 43, 30, 43, 32, 1, 12, 47, 24, 7, 7, 29, 29, 28, 4, 27, 7,
                          16, 24, 31, 45, 28, 39, 3, 2, 36, 11, 16, 17, 7, 36, 7, 37, 48, 4,
                          18, 42, 5, 25, 35, 3, 37, 13, 5, 11, 5, 25, 24, 41, 30, 34, 0, 19,
                          20, 17, 32, 12, 48, 6, 23, 42, 50, 1, 20, 44, 41, 33, 44, 28, 37,
                          28, 42, 2, 45, 17, 48, 10, 21, 12, 15, 20, 8, 38, 22, 46, 0, 11,
                          3, 46, 3, 0, 27, 19, 18, 16, 7, 35, 34, 50, 44, 28, 36, 35, 4, 0,
                          16, 30, 27, 24, 9, 23, 10, 31, 5, 9, 47, 5, 6, 13, 26, 7, 41, 40,
                          13, 11, 14, 11, 15, 22, 16, 46, 0, 43, 16, 31, 49, 43, 46, 27, 26,
                          17, 48, 32, 17, 8, 28, 9, 44, 19, 28, 9, 47, 3, 25, 24, 6, 4, 50,
                          5, 31, 45, 8, 3, 20, 31, 3, 25, 10, 41, 18, 8, 10, 28, 48, 46, 47,
                          36, 23, 46, 12, 41, 45, 1, 15, 21, 11, 42, 40, 25, 39, 15, 31, 32,
                          14, 6, 28, 38, 48, 31, 19, 15, 0, 24, 7, 6, 1, 0, 17, 23, 8, 9, 8,
                          19, 4, 22, 17, 29, 33, 25, 31, 29, 0, 4, 47, 15, 43, 10, 30, 34,
                          8, 9, 35, 50, 18, 27, 2, 11, 4, 21, 10, 50, 16, 48, 19, 4, 31, 8,
                          46, 9, 38, 21, 2, 44, 24, 43, 13, 21, 11, 38, 41, 25, 40, 23, 32,
                          35, 19, 19, 21, 47, 9, 30, 14, 1, 22, 34, 29, 15, 9, 29, 46, 27,
                          49, 20, 45, 30, 43, 39, 19, 45, 24, 26, 26, 20, 29, 50, 39, 49,
                          16, 39]) == 1856
end
